package com.wpp.register.metric;

import java.time.LocalDateTime;

/**
 * @Classname TimeMetic
 * @Description TODO
 * @Date 2020/12/8 23:00
 * @Created by wpp25
 */
public class TimeMetric {

    /**
     * 最后一次请求耗时  单位 ms
     */
    private Long lastTimeConsuming;

    private LocalDateTime lastRequestTime;

    /**
     * 访问的接口
     */
    private String className;

    /**
     * ip + port
     */
    private String serverAddress;

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Long getLastTimeConsuming() {
        return lastTimeConsuming;
    }

    public void setLastTimeConsuming(Long lastTimeConsuming) {
        this.lastTimeConsuming = lastTimeConsuming;
    }

    public LocalDateTime getLastRequestTime() {
        return lastRequestTime;
    }

    public void setLastRequestTime(LocalDateTime lastRequestTime) {
        this.lastRequestTime = lastRequestTime;
    }

    public String getServerAddress() {
        return serverAddress;
    }

    public void setServerAddress(String serverAddress) {
        this.serverAddress = serverAddress;
    }

    @Override
    public String toString() {
        return "TimeMetric{" +
                "lastTimeConsuming=" + lastTimeConsuming +
                ", lastRequestTime=" + lastRequestTime +
                ", className='" + className + '\'' +
                ", serverAddress='" + serverAddress + '\'' +
                '}';
    }
}
